package cn.tedu.demo7;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Demo {
    public static void main(String[] args) {
        System.out.println("Spring容器初始化完毕");
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("cn.tedu.demo7");
        Person perpon = context.getBean(Person.class);
        perpon.play();
        System.out.println("容器创建成功");
        context.close();
        System.out.println("Spring容器关闭了");
    }
}
